<?php
require('conexion.php');
session_start();
if(isset($_SESSION['idven']))
$idven=$_SESSION['idven'];
$sql = "select total, subtotal from ventas where id_venta='$idven' ";
$rs = $conn->Execute($sql);
$result=array(
'total'=>$rs->fields[0],
'subtotal'=>$rs->fields[1],
);

echo json_encode($result);		
			
?>